﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NCT.Framework;
using VISS.API.Users;

public partial class modules_users_userReport : System.Web.UI.Page
{
    protected string ListTitle { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
        string userKey = Request.QueryString["key"];

        if (userKey != null && userKey.Length > 0) {
            idReportList.ReportList = StructureMapFactory.GetInstance<IUserReportAdmin>().GetByReportedUserKey(userKey);
            ListTitle = "Báo Cáo Vi Phạm Về " + StructureMapFactory.GetInstance<IUserGeneralProfileAdmin>().GetByUserKey(userKey).Name;
            idReportList.DisplayLink = false;
        }
        else {
            idReportList.ReportList = StructureMapFactory.GetInstance<IUserReportAdmin>().GetAllByStatus(EUserReportStatus.UnRead);
            ListTitle = "Báo Cáo Vi Phạm Chưa Xử Lý";
            idReportList.DisplayLink = true;
        }
        
        
    }
}
